package android.pot.com.smartcar.guidepage.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.pot.com.smartcar.R;
import android.pot.com.smartcar.base.BaseFragment;
import android.pot.com.smartcar.ui.StartupPageActivity;
import android.pot.com.smartcar.util.StartupUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;

public class LastFragment extends BaseFragment {
	@Override
	public View onCreateView(LayoutInflater inflater,
			ViewGroup container,Bundle savedInstanceState) {

		View v = inflater.inflate(R.layout.fragment_guide_last, container,
				false);
		
		initView(v);

		return v;
	}

	@Override
	protected void initData() {

	}

	@Override
	protected void initView(View view) {
		View views = view.findViewById(R.id.enter_in);

		views.setOnClickListener(new NextStepListener());

	}

	@Override
	protected void addListener() {

	}


    public class NextStepListener implements OnClickListener{

        @Override
        public void onClick(View v) {
			//最后设置，防止在引导页退出，下次登录出现的问题。
			StartupUtils.setFirstStartUp(getActivity());
            Intent intent=new Intent(getActivity(), StartupPageActivity.class);
            startActivity(intent);
            getActivity().finish();
        }
    }




}
